import styles from "./less/welcome.module.css";
import { useLocation, useRouteLoaderData } from "react-router-dom";

export default function Login() {
    // 获取当前路由信息
    const $route = useLocation();
    console.log("$route", $route);

    // 获取路由加载器返回的数据 useRouteLoaderData(route-id)
    const data = useRouteLoaderData($route.pathname);
    console.log("data", data);

    return (
        <div className={styles.welcome}>
            <div className={styles.content}>
                <div className={styles.subTitle}>欢迎体验</div>
                <div className={styles.title}>后台管理系统</div>
                <div className={styles.desc}>React18+ReactRouter6.0+AntD5.4+TypeScript5.0+Vite</div>
            </div>
            <div className={styles.img}></div>
        </div>
    );
}
